package com.amumu.utils;

import com.amumu.vo.ResultVO;

/**
 * 
 * @date   2018年10月13日
 * @author Amumu
 */
public class ResultVOUtil {

    @SuppressWarnings("rawtypes")
	public static ResultVO success(Object object) {
        ResultVO resultVO = new ResultVO();
        resultVO.setData(object);
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        return resultVO;
    }

    
    public static ResultVO<Object> success() {
        return success(null);
    }

    
    public static ResultVO<Object> error(Integer code, String msg) {
        ResultVO<Object> resultVO = new ResultVO<Object>();
        resultVO.setCode(code);
        resultVO.setMsg(msg);
        return resultVO;
    }
    
}
